package elearning.service;

import java.io.Serializable;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Service;
import elearning.dao.CmsUserDao;
import elearning.model.CmsUser;


@Service("cmsUserService")
@Scope(value="singleton",proxyMode=ScopedProxyMode.TARGET_CLASS)
public class CmsUserServiceImpl implements CmsUserService,Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	CmsUserDao cmsUserDao;
	@Override
	public List<CmsUser> queryAll() {
		return cmsUserDao.queryAll();
	}
	@Override
	public CmsUser create( CmsUser cmsUser) {
		return cmsUserDao.save(cmsUser);
	}
	@Override
	public CmsUser update( CmsUser cmsUser) {
		return cmsUserDao.update(cmsUser);
	}
	@Override
	public CmsUser get(Integer id) {
		return cmsUserDao.get(id);
	}
	@Override
	public CmsUser getByUserName(String userName) {
		return cmsUserDao.getByUserName(userName);
	}
}
